<script setup>
import { ref, watch } from 'vue';
import { useTeacherStore } from '@/stores/modules/teacherStore.js';

const teacherStore = useTeacherStore();

const isShowReservation = ref(teacherStore.restrictState);

watch(isShowReservation, teacherStore.setRestrictState);
</script>

<template>
    <div class="container">
        <div>
            <div class="label">昵称</div>
            <div class="name">{{ teacherStore.teacherName }}</div>
        </div>
        <div>
            <div class="label">账号</div>
            <div class="num">{{ teacherStore.teacherId }}</div>
        </div>
        <div>
            <div class="label">预约记录显示</div>
            <div>
                <el-radio-group v-model="isShowReservation">
                    <el-radio-button :label="0">显示</el-radio-button>
                    <el-radio-button :label="2">隐藏</el-radio-button>
                </el-radio-group>
            </div>
        </div>
    </div>
</template>

<style lang="scss" scoped>
.container {
    height: 100vh;
    background-color: rgb(247, 247, 247);

    div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 18rem;
        height: 60rem;
        padding-left: 10rem;
        padding-right: 12rem;
        border-bottom: 1px solid rgb(238, 238, 238);
        background-color: #fff;
    }

    .name {
        margin-right: 10rem;
    }

    .num {
        margin-right: 10rem;
    }

    .icon {
        margin-right: 5rem;
    }
}
</style>
